package com.kuanter.kuanterauto.entity;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;

import com.kuanter.kuanterauto.R;

public class City {

	private String areaIdForWeather;
	private String standardCoordinate;
	private String gpsCoordinate;
	private String cityID;
	private String cityName;
	
	public String getAreaIdForWeather() {
		return areaIdForWeather;
	}
	public void setAreaIdForWeather(String areaIdForWeather) {
		this.areaIdForWeather = areaIdForWeather;
	}
	public String getCityID() {
		return cityID;
	}
	public void setCityID(String cityID) {
		this.cityID = cityID;
	}
	public String getCityName() {
		return cityName;
	}
	public void setCityName(String cityName) {
		this.cityName = cityName;
	}
	
	public String getStandardCoordinate() {
		return standardCoordinate;
	}
	public void setStandardCoordinate(String standardCoordinate) {
		this.standardCoordinate = standardCoordinate;
	}
	public String getGpsCoordinate() {
		return gpsCoordinate;
	}
	public void setGpsCoordinate(String gpsCoordinate) {
		this.gpsCoordinate = gpsCoordinate;
	}
	public static List<City> getCitys(Context context) {
		List<City> cityList = new ArrayList<City>();
		String[] cityListName = context.getResources().getStringArray(R.array.cityListName);
		String[] cityListID = context.getResources().getStringArray(R.array.cityListID);
		String[] weaCityID = context.getResources().getStringArray(R.array.wea_cityID);
		String[] gpsCoordinate = context.getResources().getStringArray(R.array.gpsCoordinate);
		for(int i = 0; i < cityListName.length; i++) {
			City city = new City();
			city.setCityID(cityListID[i]);
			city.setCityName(cityListName[i]);
			city.setAreaIdForWeather(weaCityID[i]);
			city.setGpsCoordinate(gpsCoordinate[i]);
			cityList.add(city);
		}
		return cityList;
	}
	
}
